Added initial documentation tree using doxygen. More tweaks on the license text ensur...
[lwes-dotnet/github-mirror.git] / Test Projects / Org.Lwes.Tests / ESF / CursorTests.cs
blob9968e972e18a2b142258cf52db570284a7f3460f
1 namespace Org.Lwes.Tests.ESF
3 using System;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.Text;
8 using Microsoft.VisualStudio.TestTools.UnitTesting;
10 using Org.Lwes.ESF;
12 /// <summary>
13 /// Summary description for CursorTests
14 /// </summary>
15 [TestClass]
16 public class CursorTests
18 #region Properties
20 /// <summary>
21 ///Gets or sets the test context which provides
22 ///information about and functionality for the current test run.
23 ///</summary>
24 public TestContext TestContext
26 get; set;
29 #endregion Properties
31 #region Methods
33 [TestMethod]
34 public void IncrementTests()
36 Cursor c = new Cursor();
38 Assert.AreEqual(0, c.Offset);
39 Assert.AreEqual(0, c.Line);
40 Assert.AreEqual(0, c.LinePos);
42 c++;
44 Assert.AreEqual(1, c.Offset);
45 Assert.AreEqual(0, c.Line);
46 Assert.AreEqual(1, c.LinePos);
48 c++;
50 Assert.AreEqual(2, c.Offset);
51 Assert.AreEqual(0, c.Line);
52 Assert.AreEqual(2, c.LinePos);
54 c = c.Newline();
56 Assert.AreEqual(3, c.Offset);
57 Assert.AreEqual(1, c.Line);
58 Assert.AreEqual(0, c.LinePos);
60 c++;
62 Assert.AreEqual(4, c.Offset);
63 Assert.AreEqual(1, c.Line);
64 Assert.AreEqual(1, c.LinePos);
66 c = c + 2;
68 Assert.AreEqual(6, c.Offset);
69 Assert.AreEqual(1, c.Line);
70 Assert.AreEqual(3, c.LinePos);
73 #endregion Methods